package cn.javasea.graphql.service;

import cn.javasea.graphql.common.vo.PageInfo;
import cn.javasea.graphql.entity.Ad;
import com.google.common.collect.Lists;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class AdService {

    public PageInfo<Ad> queryAdList(Integer type, Integer page, Integer pageSize) {
        Ad ad = new Ad();
        ad.setId(1L);
        ad.setTitle("瓜子二手女朋友");
        ad.setType(2);
        ad.setUrl("http://www.baidu.com");
        ArrayList<Ad> adList = Lists.newArrayList();
        adList.add(ad);
        PageInfo pageInfo = new PageInfo(1, 1, 5, adList);
        return pageInfo;
    }

}
